package com.udistrital.udcajbweb.adminMenu.amusr.web.bean;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;

import com.udistrital.framework.adminMenu.modelo.Amusr;
import com.udistrital.framework.servicio.ejb.AdminMenuEJBeanLocal;
import com.udistrital.udcajbweb.comun.web.bean.BaseBean;

public class AmusrListBean extends BaseBean{

	/**
	 * idClass
	 */
	private static final long serialVersionUID = -3152495457102101330L;
	
	@EJB
	private AdminMenuEJBeanLocal adminMenuEJBeanLocal;
	
	
	private List<Amusr> amusrLista;

	@PostConstruct
	public void init() {
		amusrLista = new ArrayList<Amusr>(); 
		
	}

////	public AmusrListBean(){
//		FacesContext ctx = FacesContext.getCurrentInstance();
////		ExternalContext ectx = ctx.getExternalContext();
//		amusrLista = new ArrayList<Amusr>(); 
//		amusrLista= adminMenuEJBeanLocal.consultarAllUser();
//	}
	
	
	public void consultarAllUsers(){
		amusrLista = new ArrayList<Amusr>(); 
		amusrLista= adminMenuEJBeanLocal.consultarAllUser();
	}

	public List<Amusr> getAmusrLista() {
		return amusrLista;
	}

	public void setAmusrLista(List<Amusr> amusrLista) {
		this.amusrLista = amusrLista;
	}

	public AdminMenuEJBeanLocal getAdminMenuEJBeanLocal() {
		return adminMenuEJBeanLocal;
	}

	public void setAdminMenuEJBeanLocal(AdminMenuEJBeanLocal adminMenuEJBeanLocal) {
		this.adminMenuEJBeanLocal = adminMenuEJBeanLocal;
	}

}

